<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<!--    公共头部-->
    <th:block th:fragment="head">
    <link href="../static/images/me.jpg" th:href="@{/images/me.jpg}" rel="icon" type="image/x-ico">
    <link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css" th:href="@{/lib/editormd/css/editormd.min.css}">
        <link rel="stylesheet" th:href="@{/css/semantic.min.css}">
        <link rel="stylesheet" href="../static/css/typo.css" th:href="@{/css/typo.css}">
        <link rel="stylesheet" href="../static/css/animate.css" th:href="@{/css/animate.css}">
        <link rel="stylesheet" href="../static/lib/prism/prism.css" th:href="@{/lib/prism/prism.css}">
        <link rel="stylesheet" href="../static/lib/tocbot/tocbot.css" th:href="@{/lib/tocbot/tocbot.css}">
    <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">
        <link rel="stylesheet" href="../static/css/timeline.css" th:href="@{/css/timeline.css}">


    </th:block>
</head>
<body>


<!--导航-->
<nav id="nav" th:fragment="menu(n)" class="gird-header" style="display: none">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui olive header item" style="font-family: STSong">DreStarting</h2>
            <!--<div class="right m-item item m-mobile-hide">-->
            <a href="#" th:href="@{/}" class="olive m-item item" th:classappend="${n==1} ? 'active' "><i class="home icon"></i>首页</a>
            <a href="#" th:href="@{/types/-1}" class="olive m-item item" th:classappend="${n==2} ? 'active' "><i class="clone outline icon"></i>分类</a>
            <a href="#" th:href="@{/time}" class="olive m-item item" th:classappend="${n==3} ? 'active' "><i class="clock icon"></i>时间轴</a>
            <a href="#" th:href="@{/music}" class="olive m-item item" th:classappend="${n==4} ? 'active' "><i class="music icon"></i>音乐盒</a>
            <a href="#" th:href="@{/message}" class="olive m-item item" th:classappend="${n==5} ? 'active' "><i class="book icon"></i>留言板</a>
            <a href="#" th:href="@{/friend}" class="olive m-item item" th:classappend="${n==6} ? 'active' "><i class="heart icon"></i>友情链</a>
            <a href="#" th:href="@{/picture}" class="olive m-item item" th:classappend="${n==7} ? 'active' "><i class="image icon"></i>照片墙</a>
            <a href="#" th:href="@{/about}" class="olive m-item item" th:classappend="${n==8} ? 'active' "><i class="info icon"></i>关于我</a>
            <!--</div>-->
            <div class="right m-item item">
                <form name="search" action="#" th:action="@{/blog}" method="post" target="_blank">
                    <div class="ui icon transparent input m-margin-tb-tiny" style="color: white">
                        <input style="color: white" type="text" name="searchText" placeholder="Search....">
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-hide" style="display: none">
        <i class="sidebar icon"></i>
    </a>
</nav>

<!--公共个人资料-->
<div id="person_data">
<div class="" align="center">
<!--    <a href="#" class="ui tencent circular icon button"><i class="user icon"></i></a>-->
    <a href="#" th:href="@{/about}" class="ui circular icon button"><i class="user  icon"></i></a>
    <a href="#" class="ui wechat circular icon button" data-content="扫码加我wx"><i class="road icon"></i></a>
    <a href="#" class="ui qq circular icon button" data-content="扫码加我qq"><i class="flag icon"></i></a>
    <a href="" th:href="@{https://gitee.com/drestarting/blog}" target="_blank" class="ui github circular icon button" data-content="点击跳转Gitee" data-position="bottom center"><i class="star icon"></i></a>
<!--    <a href="" target="_blank" class="ui csdn circular icon button" data-content="点击跳转CSDN" data-position="bottom center"><i class="copyright outline icon"></i></a>-->
    <a href="#" class="ui email circular icon button" data-content="2802017649@qq.com" data-position="bottom center"><i class="envelope  icon"></i></a>
</div>

<div class="ui tencent-qr flowing popup transition hidden">
<!--    <img src="../static/images/oneStar.jpg" alt="" class="ui rounded image" style="width: 110px">-->
<!--    <div align="center">公众号</div>-->
</div>
<div class="ui wechat-qr flowing popup transition hidden">
    <img src="../static/images/wx.png" th:src="@{/images/wx.png}" alt="" class="ui rounded image" style="width: 110px">
    <div align="center">微信</div>
</div>
<div class="ui qq-qr flowing popup transition hidden">
    <img src="../static/images/qq.png" th:src="@{/images/qq.png}" alt="" class="ui rounded image" style="width: 110px">
    <div align="center">QQ</div>
</div>
</div>


<!--公共底部栏-->
<div id="footer">
<footer class="ui inverted vertical segment m-padded-tb-massive m-opacity">
    <!--容器-->
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="four wide column">
                <div style="font-size: large;font-weight: bold" class="ui inverted m-text-thin m-text-spaced m-margin-top-max" >联系我</div>
                <div class="ui inverted link list">
                    <div href="#" class="m-text-thin">Email：2802017649@qq.com</div>
                    <div href="#" class="m-text-thin">QQ：2802017649</div>
                </div>
            </div>

            <div class="four wide column" >
                <div class="ui inverted link list">
                    <div class="item">
                        <!--微信二维码-->
                        <div style="font-size: large;font-weight: bold" class="ui inverted m-text-thin m-text-spaced " >关注微信</div>
                        <img src="../static/images/oneStar.jpg" th:src="@{/images/wx.png}"  class="ui m-margin-top rounded image" alt="" style="width: 110px">
                    </div>
                </div>
            </div>

            <div class="four wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <!--微信二维码-->
                        <div style="font-size: large;font-weight: bold" class="ui inverted m-text-thin m-text-spaced " >问题交流（QQ群）</div>
                        <img src="../static/images/QQ-question.jpg" th:src="@{/images/qqGroup.png}"  class="ui m-margin-top rounded image" alt="" style="width: 110px">
                    </div>
                </div>
            </div>
            <!--博客运行时间统计-->
            <div class="four wide column">
                <div style="font-size: large;font-weight: bold" class="ui inverted  m-text-thin m-text-spaced m-margin-top">站点信息</div>
                <!--<p id="htmer_time" class="item m-text-thin"></p>-->
                <div id="blog-message">
                    <div class="ui inverted link list" style="align-content: center;margin-top: 10px">
                        <div class="m-text-thin" style="text-align: left;margin-left: 75px;">
                            文章总数： <h2 th:text="${session.blogTotalNums}" class="ui orange header m-inline-block m-margin-top-null" style="font-size:medium;"> 14 </h2> 篇
                        </div>
                        <div class="m-text-thin" style="text-align: left;margin-left: 75px">
                            访问总数： <h2 th:text="${session.viewsTotalNums}" class="ui orange header m-inline-block m-margin-top-null" style="font-size:medium;"> 14 </h2> 次
                        </div>
                        <div class="m-text-thin" style="text-align: left;margin-left: 75px">
                            评论总数： <h2 th:text="${session.commentsTotalNums}" class="ui orange header m-inline-block m-margin-top-null" style="font-size:medium;"> 14 </h2> 条
                        </div>
                        <div class="m-text-thin" style="text-align: left;margin-left: 75px">
                            留言总数： <h2 th:text="${session.messagesTotalNums}" class="ui orange header m-inline-block m-margin-top-null" style="font-size:medium;"> 14 </h2> 条
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <div style="color: #F08047;margin-top: -18px" class="ui inverted m-text-thin m-text-spaced">我的站点已营业：<span id="sitetime" class="item m-text-thin"></span> (*๓´╰╯`๓)</div>
        <a rel="nofollow"  target="_blank">备案地址:辽ICP备2020013405号-2</a>
    </div>
    </div>
</footer>
</div>


<!--公共js-->
<div id="js">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <!--  detail  -->
    <script src="//cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
    <script src="../static/lib/qrcode/qrcode.min.js" th:src="@{/lib/qrcode/qrcode.min.js}"></script>
    <script src="../static/lib/prism/prism.js" th:src="@{/lib/prism/prism.js}"></script>
    <script src="../static/lib/tocbot/tocbot.min.js" th:src="@{/lib/tocbot/tocbot.min.js}"></script>
    <!--  index，detail  -->
    <script src="../static/lib/waypoints/jquery.waypoints.min.js" th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>






<script>
    // $('#newblog-container').load(/*[[@{/footer/newblog}]]*/"/footer/newblog");


    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    // 显示公众号
    // $('.tencent').popup({
    //     popup : $('.tencent-qr'),
    //     position: 'bottom center'
    // });

    // 显示微信
    $('.wechat').popup({
        popup : $('.wechat-qr'),
        position: 'bottom center'
    });

    // 显示QQ
    $('.qq').popup({
        popup : $('.qq-qr'),
        position: 'bottom center'
    });

    // 显示邮箱
    $('.email').popup();

    // 显示CSDN
    $('.csdn').popup();

    // 显示github
    $('.github').popup();


    //置顶图标和工具栏内容
    $('#toTop-button').click(function () {
        $(window).scrollTo(0,500);
    });
    var waypoint = new Waypoint({
        element: document.getElementById('waypoint'),
        handler: function(direction) {
            if (direction == 'down') {
                $('#toolbar').hide(500);
                $('#nav').hide(500);
            } else {
                $('#toolbar').show(100);
                $('#nav').show(500);
            }
            console.log('Scrolled to waypoint!  ' + direction);
        }
    })
    // 运行时间统计
    function siteTime(){
        window.setTimeout("siteTime()", 1000);
        var seconds = 1000;
        var minutes = seconds * 60;
        var hours = minutes * 60;
        var days = hours * 24;
        var years = days * 365;
        var today = new Date();
        var todayYear = today.getFullYear();
        var todayMonth = today.getMonth()+1;
        var todayDate = today.getDate();
        var todayHour = today.getHours();
        var todayMinute = today.getMinutes();
        var todaySecond = today.getSeconds();
        /* Date.UTC() -- 返回date对象距世界标准时间(UTC)1970年1月1日午夜之间的毫秒数(时间戳)
        year - 作为date对象的年份，为4位年份值
        month - 0-11之间的整数，做为date对象的月份
        day - 1-31之间的整数，做为date对象的天数
        hours - 0(午夜24点)-23之间的整数，做为date对象的小时数
        minutes - 0-59之间的整数，做为date对象的分钟数
        seconds - 0-59之间的整数，做为date对象的秒数
        microseconds - 0-999之间的整数，做为date对象的毫秒数 */
        var t1 = Date.UTC(2021,2,01,23,46,00); //北京时间2016-12-1 00:00:00
        var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
        var diff = t2-t1;
        var diffYears = Math.floor(diff/years);
        var diffDays = Math.floor((diff/days)-diffYears*365);
        var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
        var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
        var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
        document.getElementById("sitetime").innerHTML=" 已运行"+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒";
    }
    siteTime();


</script>
</div>
</body>
</html>